package com.assignwork.service.impl;

import com.assignwork.dto.WorkLineLogMachineDTO;
import com.assignwork.vo.WorkLineLogMachineVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springblade.core.mp.base.BaseServiceImpl;
import com.assignwork.entity.WorkLineLogMachine;
import com.assignwork.mapper.WorkLineLogMachineMapper;
import com.assignwork.service.IWorkLineLogMachineService;

import java.util.Collections;
import java.util.List;

/**
 * (WorkLineLogMachine)表服务实现类
 */
@AllArgsConstructor 
@Service("workLineLogMachineService")
public class WorkLineLogMachineServiceImpl extends BaseServiceImpl<WorkLineLogMachineMapper, WorkLineLogMachine> implements IWorkLineLogMachineService {

    @Override
    public boolean saveOrUpdateDto(List<WorkLineLogMachineDTO> machine) {
        return this.saveOrUpdateBatch(WorkLineLogMachineDTO.toEtt(machine));
    }

    @Override
    public List<WorkLineLogMachineVO> listVoByArrangeId(Long arrangeId, String workType) {
        return baseMapper.listVoByArrangeId(arrangeId, workType);
    }
}
